{extend name="public/base" /}
{block name="style"}<link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> {/block}
 {block name="body"}
 <div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>站点配置</strong></li>
	</ol>
</div>
<div class="row">
	<div class="col-sm-12">
		<div class="ibox float-e-margins">
		
			<div class="ibox-content">
				<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('site')}">
				<input type="hidden" name="id" value="{$ad.id}" />
				<!--店铺基本信息-->
				<div class="panel panel-default">
				<div class="panel-heading"> 站点信息设置</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">名称：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="store_name" name="store_name" value="{$ad.name}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">地址：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="address" name="address" value="{$ad.address}"  class="form-control" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">首页链接：</label>
							<div class="input-group col-sm-4">
								<img src="{$code_url}" width="140px"/>
								<input type="text" name="" class="form-control" value="{$url}" readonly/>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">LOGO：</label>
							<div class="input-group col-sm-4">
								<input type="hidden" id="thumb" name="thumb"  value="{$ad.thumb}"/>
								<input id="upload" name="upload" type="file" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label">电话：</label>
							<div class="input-group col-sm-4">
								<input type="text" id="store_tel" name="store_tel" value="{$ad.store_tel}"  class="form-control" />
							</div>
						</div>
						
						
					</div>
				</div>
			
				
				<!--联盟介绍-->
				<div class="panel panel-default">
				<div class="panel-heading"> 联盟介绍</div>
					<div class="panel-body">   
						<div class="form-group">
							<label class="col-sm-3 control-label">联盟公告：</label>
							<div class="input-group col-sm-4"> 
								<textarea id="contents"name="contents" style="width: 500px;" rows="3">{$ad.contents}</textarea>
							</div>
						</div>
					</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">联盟介绍：</label>
							<div class="input-group col-sm-6">
								<textarea id="content" name="content" style="height: 400px;">{$ad.content}</textarea>
							</div>
						</div>
					</div>
				</div>
				<!--店铺介绍end-->
				
				<div class="form-group">
					<div class="col-sm-4 col-sm-offset-3">
						<button class="btn btn-primary" type="submit"><i class="fa fa-save"></i> 保存</button>
					</div>
				</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script src="__LIB__/datepicker/WdatePicker.js"></script>
<script src="__LIB__/ueditor/ueditor.config.js" type="text/javascript"></script>
<script src="__LIB__/ueditor/ueditor.all.js" type="text/javascript"></script>
<script>
	//编辑器
	var ueditor = UE.getEditor('content');
	//顶部导航
	upload_one('{$ad.thumb}');
	$(function() {
		$("#myForm").validate({
			rules: {
				store_name: "required",
				address: "required"
			},
			messages: {
				store_name: ICON.error + "请输入名称",
				address: ICON.error + "请输入地址"
			},
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
</script>
{/block}